import os
import pygame

pygame.init()
screen_size = (800, 600)
screen = pygame.display.set_mode(screen_size)

keep_going = True

timer = pygame.time.Clock()
jetPic = pygame.image.load(f"{os.path.dirname(__file__)}/jet_small.png")
jetX = jetPic.get_width() # 飞机宽度
jetY = jetPic.get_height() # 飞机长度

margin = 8 # 边距
posX = (screen_size[0]-jetX)/2
posY = screen_size[1]-jetY-margin

while keep_going:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            keep_going = False

    screen.fill((0, 0, 0))
    screen.blit(jetPic, (posX, posY))
    pygame.display.update()
    timer.tick(60)

pygame.quit()